<template>
  <el-row :span="20">
    <el-col :span="24">
      <iframe :src="pdfUrl"
              id="iframeStyle"
              frameborder="0"></iframe>
    </el-col>
  </el-row>
</template>

<script>
export default {
  props: {
    todosPdf: String
  },
  data () {
    return {
      pdfUrl: ''
    }
  },
  methods: {

  },
  watch: {
    todosPdf (n, o) {
      if (n != "") {
        this.pdfUrl = n;
      }
      console.log('watch-todosPdf=', n)
    }
  },
  created () {
    if (this.todosPdf != "") {
      this.pdfUrl = this.todosPdf;
    }
  }
}
</script>

<style lang="scss" scoped>
#iframeStyle {
  width: 100%;
  height: 100vh;
}
</style>